<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>

<h2>Vyhledávání aplikací</h2>

<form  method="get" action="/CodeStorage/search">
	<table class="imagetable">
		<thead>
			<tr>
				<th colspan="4">Filtrování projektů</th>
			<tr>
		</thead>
		<tbody>
			<tr>
				<td>Název:</td><td><input type="text" id="name" name="name" value="${name}" /></td>
				<td>Popis:</td><td><input type="text" id="subscription" name="subscription" value="${subscription}" /></td>
			</tr>
			<tr>
				<td>Tag:</td><td><input type="text" id="tag" name="tag" value="${tag}" /></td>
				<td>Hodnocení >=</td><td><input type="text" id="eval" name="eval" value="${eval}" /></td>
			</tr>
		</tbody>
		<tfoot>
			<tr>
				<td colspan="4"><input type="submit" class="gobutton" value=" Aplikuj filtr "></td>
			</tr>
		<tfoot>	
	</table>
</form>

<table class="imagetable">
	<thead>
		<tr>
			<th></th><th>Název</th><th>Popis</th><th>Hodnoceni</th><th>Akce</th>
		<tr>
	</thead>
	<tbody>
		<c:forEach var="app" items="${apps}">
			<tr>
						<td style="width: 50px; height: 50px"><img src="/CodeStorage/application/${app.id}/icon" alt="ikona" width="45" height="45"/></td>
						<td>${app.nazev}</td>
						<td>${app.popis}</td>
						<td>${app.hod}</td>
						<td><a href="/CodeStorage/application/${app.id}/display">Detail</a></td>
					</tr>
		</c:forEach>
	</tbody>
	<tfoot>
		<tr><td colspan="5"></td></tr>
	</tfoot>
</table>